//引入vue 
import Vue from 'vue'
// 引入vue-router
import VueRouter from 'vue-router'

// 注册router路由
Vue.use(VueRouter)

const routes = [{
        // 默认斜杠，重定向到login登录页
        path: '/',
        redirect: '/loginPage'
    },
    {
        // 首页
        path: '/indexCmpt',
        component: () =>
            import ('@/views/indexCmpt/indexCmpt.vue')
    },
    {
        // 我的页面（表格数据页面）
        path: '/myHome',
        component: () =>
            import ('@/views/myHome/myHome.vue')
    },
    {
        // 登录页面
        path: '/loginPage',
        component: () =>
            import ('@/views/loginPage/loginPage.vue')
    }
]

const router = new VueRouter({
    routes
})

// 导出路由实例
export default router